//
//  ERuntime.h
//  metadata 
//  Created by easy on 11-5-30.
//  Copyright 2011 zeasy@qq.com. All rights reserved.
//
#ifndef _FOUNDATION_H_
#import <Foundation/Foundation.h>
#endif
#ifndef _OBJC_RUNTIME_H_
#import <objc/objc-runtime.h>
#endif
//define
#ifndef ER_DEFAULT_ENCODING
#define ER_DEFAULT_ENCODING	NSUTF8StringEncoding
#endif
#ifndef ER_MAX_ARRAY_SIZE
#define ER_MAX_ARRAY_SIZE 256
#endif
#ifndef	ER_STRING_ALLOC(cstring)
#define ER_STRING_ALLOC(cstring) [[NSString alloc] initWithCString:cstring encoding:ER_DEFAULT_ENCODING]
#endif
#ifndef ER_CSTRING(nsstring)
#define ER_CSTRING(nsstring) [nsstring cStringUsingEncoding:ER_DEFAULT_ENCODING]
#endif
//context
@class ERContext;

//class
@class ERClass;
@class ERClassType;
@class ERClassAttributes;

//method
@class ERMethod;
@class ERMethodEntity;
@class ERSelector;
//field
@class ERField;
@class ERFieldEntity;

//property
@class ERProperty;

typedef enum{
	READ_WRITE = 0,
	READ_ONLY = 'R'
} ERPropertyReadWrite;

typedef enum{
	ASSIGN = 0,
	RETAIN = '&',
	COPY = 'C'
}ERPropertyAssignment;

typedef enum{
	ATOMIC = 0,
	NONATOMIC = 'N'
}ERPropertyAtomicity;

#define ER_PROPERTY_READ_ONLY 'R'
#define ER_PROPERTY_RETAIN '&'
#define ER_PROPERTY_COPY 'C'
#define ER_PROPERTY_NONATOMIC 'N'
#define ER_PROPERTY_TYPE 'T'
#define ER_PROPERTY_FIELD 'V'
#define ER_PROPERTY_SETTER 'S'
#define ER_PROPERTY_GETTER 'G'